<template>
  <div>
    <el-empty>
      <h3>{{ text() }}</h3>
    </el-empty>
  </div>
</template>

<script>
export default {
  name: 'WuliankaEmptyPage',

  data() {
    return {
      number: 5,
    };
  },

  mounted() {
    let time = setInterval(() => {
      this.number -= 1
      if (this.number < 0) {
        clearInterval(time)
        this.$router.push('/home')
      }
    }, 1000)
  },

  methods: {
    text() {
      return `无权访问此页面,${this.number}秒后返回首页!`
    },
  },
};
</script>

<style lang="less" scoped>
div {
  width: 100%;
  height: 100%;
  color: #ccc;
}

.el-empty {
  width: 100%;
  height: 100%;
}
</style>